package com.syg.validation.controller;

import com.syg.validation.domain.User;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author syg
 */
@RestController
public class ValidationController {

    @PostMapping("/valida")
    public String validation(@RequestBody @Validated User user) {
        return "成功";
    }

}
